﻿using System;
using System.Collections.Generic;
using TestBat.IModels.Domain;

namespace TestBat.IModels.Models
{
    public interface ITaskModel : IModel
    {
        /// <summary>
        /// get all tasks
        /// </summary>
        /// <returns>all tasks</returns>
        //IList<ITask> GetAll();

        /// <summary>
        /// get a task by ID
        /// </summary>
        /// <param name="taskID">the ID</param>
        /// <returns>the found task or null, if none is found</returns>
        ITask GetByID(Guid taskID);

        /// <summary>
        /// save/persist a task
        /// </summary>
        /// <param name="task">the task</param>
        void Save(ITask task);

        /// <summary>
        /// remove the task from the DB
        /// </summary>
        /// <param name="task">the task to remove</param>
        void Delete(ITask task);

        /// <summary>
        /// revert an task back to database-state
        /// </summary>
        /// <param name="task">the task</param>
        void Revert(ITask task);

        IList<IChoice> GetChoices(IChoiceTask task);

        void AddChoice(IChoiceTask task);
        void RemoveChoice(IChoice choice);
    }
}
